package com.itheima.partition;

import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Partitioner;

public class MyPartitioner extends Partitioner<IntWritable,Text> {

    @Override
    public int getPartition(IntWritable intWritable, Text text, int intReduceTasks) {

        int code = intWritable.get();
        if(code<15){
            return 0;
        }else {
            return 1;
        }
    }
}
